<?php require_once('../connections/con_gl.php'); ?>

<?php

$bar = $_GET['barang'];

$kid = $_GET['kid'];

$jum = intval($_GET['jumlah']);

// get kendaraan

mysql_select_db($database_con_gl, $con_gl);

$query_harga = "select a.hargasewa from gl_jenbar a, gl_jkendaraan b, gl_kendaraan c where a.barang='$bar' AND c.nopol='$kid' AND b.id = c.jenis AND b.id = a.jenis";

$harga       = mysql_query($query_harga, $con_gl) or die(mysql_error());

$row_harga   = mysql_fetch_assoc($harga);

$total_harga = mysql_num_rows($harga);

?>

<input name="hargasatuan" type="text" id="hargasatuan" onchange="javascript:this.form.total.value=(this.form.jumlah.value * this.form.hargasatuan.value) - (this.form.jumlah.value * this.form.hargasatuan.value * this.form.diskon.value / 100);" value="<?php echo $row_harga['hargasewa'] * $jum;?>" size="10" maxlength="10"/><input name="xharga" type="hidden" id="xharga" value="<?php echo $row_harga['hargasewa'];?>"/>
